import { Radio } from "antd"

const InputRadio = (props) => {
  return <Radio.Group
    {...props}
  ></Radio.Group>
}

InputRadio.propsMap = [
  {
    type: 'selectOptions',
    name: 'options',
    label: '选项'
  },
  {
    type: 'select',
    name: 'optionType',
    label: '展示类型',
    inputProps: {
      options: [
        {
          value: 'default',
          label: '默认'
        },
        {
          value: 'button',
          label: '按钮'
        }
      ]
    }
  },
  {
    type: 'radio',
    name: 'buttonStyle',
    label: '按钮外观',
    inputProps: {
      options: [
        {
          value: 'outline',
          label: '空心'
        },
        {
          value: 'solid',
          label: '实心'
        }
      ]
    },
    hide: (form) => {
      return form.getFieldValue('optionType') === 'button'
    }
  }
]

export default InputRadio